import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import api from './api'
import store from './store'
// import config from './config'

// import axios from 'axios'
import request from './utils/request'
// 测试环境变量配置
// console.log('config=>', config)
// axios.get(config.mockApi + '/login').then((res) => {
//   console.log(res.data)
// })

// 统一导入el-icon图标
import * as ElIconModules from '@element-plus/icons'


const app = createApp(App)

// 统一注册el-icon图标
for(let iconName in ElIconModules){
  app.component(iconName,ElIconModules[iconName])
}

app.config.globalProperties.$request = request
app.config.globalProperties.$api = api
app.use(ElementPlus, {size: 'small'})
app.use(router)
app.use(store)
app.mount('#app')


console.log("环境变量", import.meta.env);
